<%--
 *  File:    ActivityManageUserSummary.jsp
 *  @Author: Hilldao
 *  Date:    2010/07/31
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>


<%
  //init param
  Category cat = Category.getInstance("jsp.ActivityManageUserSummary");
   
  String strModuleName = "DMS";
  String strTableName = "v_activitymanageuser1";
  Integer sourceorgid = new Integer(-1);
  String contextPath = request.getContextPath();
  String isView = request.getParameter("isview");
  if(isView == null && session.getAttribute("isview") != null){
  	isView = session.getAttribute("isview").toString();
  }
%>



<%
  //get userinfo
  HashMap CurUserInfo = (HashMap)session.getAttribute("userinfo");



String optionvalue = null;

	if(pageContext.getAttribute("optionvalue") != null) {
		optionvalue=((Integer)pageContext.getAttribute("optionvalue")).toString();
	}else{
		optionvalue=(String)(request.getParameter("optionvalue"));
	}
	
	//optionvalue=(optionvalue==null)?"":("&optionvalue="+optionvalue);
	if(session.getAttribute("optionvalue")  != null) {
	
		optionvalue=((Integer)session.getAttribute("optionvalue")).toString();
	}
	
	
	//out.println("header"+optionvalue); 
 int d=0;
 
 d = Integer.parseInt(optionvalue);

	java.text.DateFormat format=new java.text.SimpleDateFormat("yyyy-MM-dd");
	
	//活动影响结束时间
	Date influencedate=new Date();
	if(request.getParameter("influencedate")!=null && request.getParameter("influencedate").length()>0 ){
	  influencedate = format.parse(request.getParameter("influencedate").toString());
	  
	 
	}
//活动影响时间+i
Calendar newinfluence = Calendar.getInstance();
	
newinfluence.setTime(influencedate);

newinfluence.add(Calendar.DAY_OF_YEAR,d);//日期加i天


	
	Date newinfluencedate=newinfluence.getTime();

	//活动准备开始时间

	Date readystartdate=new Date();
	if(request.getParameter("readystartdate")!=null  && request.getParameter("readystartdate").length()>0){
	 readystartdate = format.parse(request.getParameter("readystartdate").toString());
	 
	 
	 
	}

	
	Calendar newreadystartdate = Calendar.getInstance();
	
	newreadystartdate.setTime(readystartdate);

	newreadystartdate.add(Calendar.DAY_OF_YEAR,d);//日期加i天

	
	Date newready=newreadystartdate.getTime();

//System.out.println(newready);

	//活动开始时间	

	Date startdate=new Date();
	if(request.getParameter("startdate")!=null  && request.getParameter("startdate").length()>0){
	 startdate = format.parse(request.getParameter("startdate").toString());
	 
	
	}
	
	Calendar newstartdate = Calendar.getInstance();
	
	newstartdate.setTime(startdate);

	newstartdate.add(Calendar.DAY_OF_YEAR,d);//日期加i天

	
	Date newstart=newstartdate.getTime();



	//活动结束时间
	Date enddate=new Date();
	if(request.getParameter("enddate")!=null  && request.getParameter("enddate").length()>0){
	 enddate = format.parse(request.getParameter("enddate").toString());
	}
	
	Calendar newenddate = Calendar.getInstance();
	
	newenddate.setTime(enddate);

	newenddate.add(Calendar.DAY_OF_YEAR,d);//日期加i天

	
	Date newend=newenddate.getTime();


	//系统时间
String ss=format.format(new Date());
Date sysdate = format.parse(ss.toString());



%>
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>
<%@ include file="/inc/CatchError.inc" %>
<%@ include file="/inc/InitEdit.inc" %>

<html>
<iframe name="summaryfrm" scrolling="no" frameborder="0"
	style="position:absolute; top:0px; left:0px; display:none;border:#909eff 1px solid;"></iframe>
<head>
<head>
<title>ActivityManageUserSummary</title>
<PageFlow:CheckPageFlow pageName="p_activitymanageuser"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../../css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="../js/FuncLib.js"></script>
<script language="JavaScript" src="../../js/ScriptLib.js"></script>
<%@ include file="../../inc/SummaryDivision.inc" %>
<iframe name="reloadHandler" style="display:none" ></iframe>
<%

  //OvalCustomTable table = new OvalCustomTable(strLanguageCode);
  //OvalCustomColumn column = new OvalCustomColumn(strLanguageCode);


  Vector visitprocessprodinfo = (Vector)pageContext.getAttribute("visitprocessprodinfo");
  if(visitprocessprodinfo == null)
  {
    visitprocessprodinfo = new Vector();
  }

    HashMap orgInfo = (HashMap)pageContext.getAttribute("orginfo");
	if (orgInfo == null) orgInfo = new HashMap();

    boolean ispharmacy = false;

    Integer globalPCCode =  (Integer)orgInfo.get("globalpccode");

	
	Integer zmylcustomtype =  (Integer)orgInfo.get("zmylcustomtype");


	if(globalPCCode == null) globalPCCode = new Integer("-1");
    if(zmylcustomtype == null) globalPCCode = new Integer("-1");
	/*if(new Integer(114).equals(globalPCCode)&&new Integer(10).equals(zmylcustomtype)){
		 ispharmacy=true;
	}*/
	
	Integer activitymanageid =  (Integer)pageContext.getAttribute("activitymanageid");
	Integer employeeid =  (Integer)pageContext.getAttribute("employeeid");
	Integer count =  (Integer)pageContext.getAttribute("count");
	
	
	

	
%>
<script>


  	
function page_add()
{

  //if(!checkALLElems(document.getElementById("newdetail"))) return;
   <%if(ispharmacy){%>
  if(isEmpty(document.resoninfoform.employeeid.value)&&isEmpty(document.resoninfoform.hospitalid.value))
   { alert("<%= message.getMessageDesc("P_Please_Select_Employee_Or_Hospital") %>");
      return;
    }
  <%}%>
    document.resoninfoform.actionname.value = "add";
	isRunning = true;
    document.resoninfoform.target = "_self";
	document.resoninfoform.submit();
}
function page_delete() {

  if (checkedNumber(document.resoninfoform.deleteids) == 0) {
     alert("<%= message.getMessageDesc("PLEASE_SELECT") %>");
    return;
  }

  document.resoninfoform.actionname.value = "delete";
	isRunning = true;
    document.resoninfoform.target = "_self";
	document.resoninfoform.submit();
}
function checkedNumber(ids) {
  if(ids == null)
    return 0;
  if(ids.length == null) {
    if(ids.checked)
      return 1;
    else
      return 0;
  }
  var count = 0;
  for(var i = 0; i < ids.length; i ++) {
    if(ids[i].checked)
      count ++;
  }
  return count;
}

function page_summary(actionvalue,orderbyname)
{
  
  var editform = summaryPrepare(resoninfoform,actionvalue,orderbyname);
  editform.action = "ActivityManageUserSummary.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_self";
  isRunning = true;
  editform.submit();
}
function parentemppop()
{
   if(isEmpty(document.resoninfoform.zmylprodgroupid.value))
   { alert("<%= message.getMessageDesc("P_Please_Frist_Select_Prodgroup") %>");
      return;
    }
  window.open("EmployeeSelect.jsp?<%= OvalTools.randomURL() %>&employeetype="+document.resoninfoform.employeetype.value+"&selectoption=owner&languagecode=<%= strLanguageCode %>&employeeid="+document.resoninfoform.employeeid.value, "newwindow", "height=250, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}
function parentemppop1()
{

  window.open("ProductbrandPopWindow.jsp?<%= OvalTools.randomURL() %>&zmylorgid="+document.resoninfoform.orgid.value+"&selectoption=owner&languagecode=<%= strLanguageCode %>&employeeid="+document.resoninfoform.employeeid.value +"&globalpccode="+document.resoninfoform.globalpccode.value, "newwindow", "height=400, width=600,top=120,left=120,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=yes");
}
function page_setEmployee(id,name,code)
{ 
  document.resoninfoform.employeeid.value = id;
  document.resoninfoform.employeecode.value = name;
  document.resoninfoform.employeename.value = code;
  <%if(ispharmacy){%>
  resoninfoform.hospitalid.value = "";
  resoninfoform.hospitalname.value = "";
  <%}%>
}
function set_orgNameByPopWindow(id,code,name){
	document.resoninfoform.prodgroupcode.value=code;
	document.resoninfoform.prodgroupname.value=name;
	document.resoninfoform.zmylprodgroupid.value=id;
    reloadprodgroup();
}

/*function poporg()
{
  window.open("../ogm/OrgSelect.jsp?<%= OvalTools.randomURL() %>&orgglobalpccode=113&selectoption=switchglobalpccode&orgid="+resoninfoform.orgid.value+"&languagecode=<%= strLanguageCode %>", "newwindow", "height=250, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}*/
function page_setOrg(id,name,code)
{
  resoninfoform.orgid.value = id;
  resoninfoform.orgcode.value = code;
  resoninfoform.orgname.value = name;

}
function reloadprodgroup()
{
  if (isEmpty(resoninfoform.prodgroupcode.value)){
    resoninfoform.zmylprodgroupid.value=" ";
    resoninfoform.prodgroupcode.value="";
    resoninfoform.prodgroupname.value="";
    resoninfoform.employeetype.value="";
    resoninfoform.employeetypename.value="";
      return;
    }

    var  datahandler = new  DataHandler();
     datahandler.add_params("prodgroupcode",eval("document.resoninfoform.prodgroupcode").value) ;
    datahandler.add_params("prodgroupcode",eval("document.resoninfoform.prodgroupcode").value) ;
     datahandler.getResultFromHashMap("info" ,"zmylprodgroupid" ,"document.resoninfoform.zmylprodgroupid");
    datahandler.getResultFromHashMap("info" ,"prodgroupcode" ,"document.resoninfoform.prodgroupcode");
    datahandler.getResultFromHashMap("info" ,"prodgroupname" ,"document.resoninfoform.prodgroupname");
    datahandler.getResultFromHashMap("info" ,"employeetype" ,"document.resoninfoform.employeetype");
    datahandler.getResultFromHashMap("info" ,"employeetypename" ,"document.resoninfoform.employeetypename");
     datahandler.getResultFromHashMap("info" ,"additionalcaptionid" ,"document.resoninfoform.additionalcaptionid");
    datahandler.add_job("j_getprodgroupbycode") ;
    datahandler.runDataHandler ();
}

function poporg()
{

	var objecttype=document.resoninfoform.objecttype.value;
	var parentorgid=document.resoninfoform.parentorgid.value;

    var orgtype = 1;//resoninfoform.buyertype.value;
	if( objecttype==1 || objecttype==3){
		
		var newwin = window.open("../../zmyl/agreement/AgreementOrgSelect.jsp?<%= OvalTools.randomURL() %>&selectoption=agreementprod&zmylisseller=Y&objecttype=1&zmylagreementconfigid="+orgtype+"&languagecode=<%= strLanguageCode %>", "newwindow3", "height=250, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
	}
	if(objecttype==2 )
	{
 		 var newwin = window.open("../../masterdata/ogm/OrgSelect.jsp?<%= OvalTools.randomURL() %>&selectoption=agreementorgprd&zmylisseller=N&zmylagreementconfigid="+orgtype+"&languagecode=<%= strLanguageCode %>", "newwindow3", "height=250, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
	}
   if( objecttype==4){
   var newwin = window.open("../../zmyl/agreement/AgreementOrgSelect.jsp?<%= OvalTools.randomURL() %>&selectoption=agreement&zmylisseller=Y&objecttype=1&zmylagreementconfigid="+orgtype+"&parentorgid="+parentorgid+"&languagecode=<%= strLanguageCode %>", "newwindow3", "height=250, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
<!--   var newwin = window.open("../../masterdata/ogm/OrgSelect.jsp?<%= OvalTools.randomURL() %>&selectoption=agreementorgprd&zmylisseller=N&zmylagreementconfigid="+orgtype+"&parentorgid="+parentorgid+"&languagecode=<%= strLanguageCode %>", "newwindow3", "height=250, width=600,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");-->
  
	}
}

function page_setOrg4(id,name,code)
{
  resoninfoform.orgid.value = id;
  resoninfoform.orgcode.value = code;
  resoninfoform.orgname.value = name;

}

function popprod()
{
   var popurl = "../../masterdata/pcm/ItemSelectForPO.jsp?<%= OvalTools.randomURL() %>&selectopt=all"
   popup(popurl,'newwindow3','width=600,height=500,top=0,left=0,toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=no, status=yes');
}

function page_setItem(id, buyeritemcode, name, umcode, umname,prdocname,listprice,taxrate,islotcontrol, costprice,prodid,selleritemcode,attricod,piece,prdn,spec,zmycontentspec)
{
     resoninfoform.prodid.value = prodid;
     resoninfoform.prodcode.value = buyeritemcode;
        resoninfoform.prodname.value = name;
    if (popwindow != null) popwindow.close();
  //returnwarehouseandprice("","",obj[0].value,"120.00","CNY",umcode,"100");
}

function page_setProduct(id,code,name,price,spec){	
	if(switchtype==3){
		resoninfoform.serproductid.value=id;
		resoninfoform.serproductcode.value=code;
		resoninfoform.serproductname.value=name;
	}else if(switchtype==6){
		resoninfoform.prodid.value=id;
		resoninfoform.prodcode.value=code;
		resoninfoform.prodname.value=name;
	}
	hiddenFrm();
}

var isHidden;
function frm_select(e,flag){
	switchtype=flag;
	isHidden = "block";
	var productgroupid=resoninfoform.productgroupid.value;
	var _target = getPosition(e);
    var _obj = document.getElementById("summaryfrm");
    _obj.style.left = _target.x;
    _obj.style.top = _target.y + e.clientHeight;
    _obj.style.height="250px";
    _obj.style.width="530px";
    _obj.style.zIndex = 5000;
    _obj.style.display = "block";
	var strUrl = "";	
	if(flag==1 || flag==4){
		strUrl = "<%=contextPath %>/tdr/datatypein/OrgSelectPop.jsp?maxitem=8&globalpccode=1&<%= OvalTools.randomURL() %>";
	}else if(flag==2 || flag==5){
		if(flag==5)_obj.style.left = _target.x-530;
		strUrl = "<%=contextPath %>/tdr/datatypein/OrgSelectPop.jsp?maxitem=8&globalpccode=2&<%= OvalTools.randomURL() %>";
	}else if(flag==3 || flag==6){
		_obj.style.height="300px";
		strUrl = "<%=contextPath %>/tdr/datatypein/ProdSelectPop.jsp?maxitem=10&<%= OvalTools.randomURL() %>"+"&productgroupid="+productgroupid;
	}
    document.summaryfrm.location.href = strUrl;
}
function getPosition(e) {
        var left = 0;
        var top = 0;
        while (e.offsetParent) {
            left += e.offsetLeft + (e.curentStyle? (parseInt(e.curentStyle.borderLeftWidth).NaN0()):0);
            top += e.offsetTop + (e.curentStyle ? (parseInt(e.curentStyle.borderTopWidth)).NaN0() : 0);
            e = e.offsetParent;
        }
        left += e.offsetLeft + (e.curentStyle ? (parseInt(e.curentStyle.borderLeftWidth)).NaN0() : 0);
        top += e.offsetTop + (e.curentStyle ? (parseInt(e.curentStyle.borderTopWidth)).NaN0() : 0);
        return {x:left, y:top};
}

function hiddenFrm(){
	document.getElementById("summaryfrm").style.display = "none";
}


function page_popUserwindow()
{
	var url = "<%=contextPath%>/sfe/activity/EmployeeBussiseForPopInfo.jsp?"+"threadxcnt=0.06165288538971159"+"&orgid=1&languagecode=cn";
	var windowAttribute = "height=400, width=600,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'hospitalinfo',windowAttribute);	
}

function setSalesMan(userid,username,station,employeename){
	document.resoninfoform.userids.value=userid;
	document.resoninfoform.username.value=username;
	document.resoninfoform.employeename.value=employeename;
}


var popwindow;
function page_selectUser(){
    var employeeid=document.resoninfoform.employeeid.value;
	var url = "<%=contextPath%>/sfe/activity/EmployeeBussiseForPopInfo.jsp?activitymanageid="+document.resoninfoform.activitymanageid.value+"&<%= OvalTools.randomURL()%>&employeeid="+employeeid;
	var windowAttribute = "height=400, width=600,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  	if(popwindow!=null) popwindow.close();
  	popwindow = window.open(url,null,windowAttribute);
}

function page_setusers(id,username,employeename){
	var frm = document.resoninfoform;
	frm.userids.value = id;
	frm.username.value = username;
	frm.employeename.value = employeename;
}

function closethewindow()   
{  
   var url = "<%=contextPath%>/sfe/activity/ActivityManageEdit.jsp?activitymanageid="+document.resoninfoform.activitymanageid.value+"&count="+document.resoninfoform.count.value+"&<%= OvalTools.randomURL()%>"; 
  opener.document.location=url;   window.close();   
}



</script>

</head>
<body>
<table width="100%" cellspacing="0">
 <form name="resoninfoform" method="post" action="../../Dispatcher"  target="_parent">
   <input type="hidden" name="pagename" value="p_activitymanageuser">
	 <input type="hidden" name="actionname">
	 <input type="hidden" name="languagecode" value="<%= strLanguageCode %>">

<custom:hidden property="productgroupid"/>
     <custom:hidden property="parentorgid"/>
     <custom:hidden property="datacategory"/>
     <custom:hidden property="globalpccode"/>
    <custom:hidden property="objecttype"   />
    <input type="hidden" name="activitymanageid" value="<%=activitymanageid %>">
    <input type="hidden" name="count" value="<%=count%>">
    <input type="hidden" name="employeeid" value="<%=employeeid %>">
   	<input type="hidden" name="na" value=" ">
   	
   		 <input type="hidden" name="startdate" value="<%=request.getParameter("startdate")%>">
    <input type="hidden" name="enddate" value="<%=request.getParameter("enddate")%>">
    <input type="hidden" name="readystartdate" value="<%=request.getParameter("readystartdate")%>">
    <input type="hidden" name="influencedate" value="<%=request.getParameter("influencedate")%>">
    <input type="hidden" name="ss" value="<%=ss%>"
    <input type="hidden" name="sysdate" value="<%=sysdate%>"
    
    <input type="hidden" name="newstart" value="<%=newstart%>">
    <input type="hidden" name="newend" value="<%=newend%>">
    <input type="hidden" name="newready" value="<%=newready%>">
    <input type="hidden" name="newinfluence" value="<%=newinfluence%>">

<table width="100%" cellspacing="0">
  <% //--------------------------------------  page location --%>
	<%@ include file="../../inc/PageLocation.inc" %>
</table>
<table width="100%" cellspacing="0" border="0" cellpadding="0">

  <tr>
      <td class="summary_top">
          <table width="100%" border="0" cellspacing="0">
      	   <%@ include file="/inc/SummarySearch.inc" %>
          </table>
      </td>
  </tr>
  	  <%
	         String orgCode = label.getLabelName("L_OrgCode");
		 String orgName = label.getLabelName("L_OrgName");
		 if (request.getParameter("selectoption") != null) 
		 {
			 if (request.getParameter("selectoption").equals("supplier"))
			 {
			     orgCode = label.getLabelName("L_SupplierCode");
		             orgName = label.getLabelName("L_SupplierName");
			 } 
			 else if (request.getParameter("selectoption").equals("distributor"))
			 {
			     orgCode = label.getLabelName("L_DistributorCode");
		             orgName = label.getLabelName("L_DistributorName");
			 }else if (request.getParameter("selectoption").equals("xjpcustomer"))
			 {
			     orgCode = label.getLabelName("L_CustomerCode");
		             orgName = label.getLabelName("L_CustomerName");
			 }


		 }
	  %>
  <tr>
    <td>
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
        <tr bgcolor="#ACBCCA" class="deepblue-left">
        	<td width="2%" class="title_center">&nbsp;</td>
            <td width="20%" class="title_center"><a href="javascript:page_summary('orderby','username')"><%= label.getLabelName("L_Login")+ label.getLabelName("L_Num1") %></a></td>
            <td width="20%" class="title_center"><a href="javascript:page_summary('orderby','employeename')"><%= label.getLabelName("L_EmployeeName") %></a></td>
            
            
             
             
            <%if(readystartdate.equals(sysdate) || readystartdate.before(sysdate)){//活动准备开始时间到活动前显示 %>
              <%if(newstart.equals(sysdate) || newstart.after(sysdate)){%>
            <td width="15%" class="title_center"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Para1ForOCP4") %></td>
            	<%}else{ %>
            	<td width="15%" class="title_center"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Para1ForOCP4") %></td>
            	<%} }%>
          <%if(startdate.equals(sysdate) || startdate.before(sysdate)){//活动开始时间到活动中显示 %>
		        <%if(newend.equals(sysdate) || newend.after(sysdate)){%>
		        
            <td width="15%" class="title_center"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Hit") %></td>
            <%}else{ %>
            	<td width="15%" class="title_center"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Hit") %></td>
                        	<%} }%>
         <%if(enddate.equals(sysdate) || enddate.before(sysdate)){//活动结束时间到活动后显示 %>
		       <%if((newinfluencedate.equals(sysdate) || newinfluencedate.after(sysdate)) ){%>  
            <td width="15%" class="title_center"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Back1") %></td>
            <%}else{ %>
            	<td width="15%" class="title_center"><%= label.getLabelName("L_Activity")+label.getLabelName("L_Back1") %></td>
            	<%} }%>
            <td width="15%" class="title_center"><%= label.getLabelName("L_IsPresence") %></td>
                        	
       	</tr>

        <%
             int j = 0;
             String strClassType = new String();
             Integer nDefaultId = new Integer(-1);
             boolean bHasChecked = false;
          %>
          <logic:iterate id="reasoninfo" collection="<%= visitprocessprodinfo %>">

         <%
            HashMap resoninfoMap = (HashMap)pageContext.getAttribute("reasoninfo");

            String strIsDisabled = new String("");
            String strIsChecked = new String("");

            if(j%2 == 1){
              strClassType = "td-listrom";
            }else{
              strClassType = "";
            }
           if(!bHasChecked)
            {
              strIsChecked = "Checked";
              bHasChecked = true;
              nDefaultId = (Integer)(resoninfoMap.get("orgid"));
            }
            j++;
          %>

		<tr>
              
            <td width="5%">
              <input type="checkbox" name="deleteids" value="<%=JspHelper.filterNull( resoninfoMap.get("activitymanageuserid"))%>" class="checkbox">
            </td>
             <td>&nbsp;<custom:write   property="username" name="reasoninfo"/></td>
             <td>&nbsp;<custom:write   property="employeename" name="reasoninfo"/></td> 
             
              <%if(readystartdate.equals(sysdate) || readystartdate.before(sysdate)){//活动准备开始时间到活动前显示 %>
              <%if(newstart.equals(sysdate) || newstart.after(sysdate)){%>
             <td>&nbsp;<custom:checkbox name="reasoninfo" property="isago" style="border:0" checkFlag="Y/N" /></td>
               <%}else{ %>
            	<td>&nbsp;<custom:checkbox name="reasoninfo" property="isago" style="border:0" checkFlag="Y/N" /></td>
            	<%} }%>
            	
            	     <%if(startdate.equals(sysdate) || startdate.before(sysdate)){//活动开始时间到活动中显示 %>
		        <%if(newend.equals(sysdate) || newend.after(sysdate)){%>
             <td>&nbsp;<custom:checkbox name="reasoninfo" property="isin" style="border:0" checkFlag="Y/N" /></td>
                       <%}else{ %>
                         	<td>&nbsp;<custom:checkbox name="reasoninfo" property="isin" style="border:0" checkFlag="Y/N" /></td>
            	<%} }%>
            	         <%if(enddate.equals(sysdate) || enddate.before(sysdate)){//活动结束时间到活动后显示 %>
		       <%if((newinfluencedate.equals(sysdate) || newinfluencedate.after(sysdate)) ){%>  
             <td>&nbsp;<custom:checkbox name="reasoninfo" property="isafter" style="border:0" checkFlag="Y/N" /></td> 
                       <%}else{ %>
                         	<td>&nbsp;<custom:checkbox name="reasoninfo" property="isafter" style="border:0" checkFlag="Y/N" /></td>
            	<%} }%>             
             
             <td>&nbsp;<custom:selectdic property="isparticipation" dictType="YesOrNo"  defaultValueCost=" " disabled="true"/></td>       
          </tr>
          </logic:iterate>
          <tr>
          	<td>&nbsp;</td>
       		<td>
				<custom:hidden  name="newhash" property="userids" />
           		<custom:text name="newhash" property="username" size="20" command="notnull" label="L_ActivityParter"/>
            	<a onclick="page_selectUser();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
       		</td>
       		<td>
				<custom:text name="newhash" property="employeename" style="border:0"/>
       		</td>
       		 <td>
				&nbsp;
       		</td>
       		<td>
				&nbsp;
       		</td>
       		<td>
				&nbsp;
       		</td>
       		<td>
				&nbsp;
       		</td>
       		
			<%    
				 if(sysdate.before(readystartdate)){
			%>
				<custom:hidden  name="newhash" property="flag" value="0"/>
			<%} %>
			<%if(readystartdate.before(sysdate) && readystartdate.equals(sysdate) && sysdate.before(startdate)){ %>
				<custom:hidden  name="newhash" property="flag" value="1"/>
			<%} %>
			<%if(startdate.before(sysdate) && readystartdate.equals(sysdate) && sysdate.before(enddate) && sysdate.equals(enddate) ){ %>
				<custom:hidden  name="newhash" property="flag" value="2"/>
			<%} %>
			<%if(sysdate.after(enddate)){ %>
				<custom:hidden  name="newhash" property="flag" value="3"/>
			<%} %>
      		
          </tr>
          <%@ include file="/inc/SummaryAction.inc"%>
</table>

      </table>
      <table width="100%" cellspacing="0" cellpadding="0">
		 <tr>
			<td class="summary_top"></td>
		 </tr>      
          <tr>
                 <td colspan="8" class="title_center">
                   <a onclick="page_add();"><custom:button type="2" label="L_Add" imgsrc="add_btn.gif" border="0" style="width:60"/></a>
                   <a onclick="page_delete();"><custom:button type="2" label="L_Delete" imgsrc="delete_btn.gif" border="0" style="width:60"/></a>
                   <a onclick="closethewindow();"><custom:button type="2" label="L_Confirm" border="0"  imgsrc="finish.gif" style="width:60"/></a>
                 </td>
		  </tr>
      </table>
</form>
</table>
</body>

</html>


